<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/public/commons.jspf"%>
<html>
<head>
<title>导航菜单</title>
<link type="text/css" rel="stylesheet" href="style/blue/menu.css" />
<script type="text/javascript">
	function menuClick(menu) {
		$(menu).next().toggle();
	}
</script>
</head>
<body style="margin: 0">
	<div id="Menu">
		<ul id="MenuUl">
			<!--显示一级菜单  -->
			<s:iterator value="#application.TopPrivilegeList">
				<!--判断是否有权限  -->
				<!--从session对象中调用user对象的hasPrivilegeByName()方法，判断是否用有权限  -->
				<s:if test="#session.user.hasPrivilegeByName(name)">
					<li class="level1">
						<div onClick="menuClick(this);" class="level1Style">
							<img src="style/images/MenuIcon/${id}.gif" class="Icon" />
							${name} 
						</div>

						<ul class="MenuLevel2" id="aa">
							<!--显示二级菜单  -->
							<s:iterator value="children">
								<s:if test="#session.user.hasPrivilegeByName(name)">
									<li class="level2">
										<div class="level2Style">
											<img src="style/images/MenuIcon/menu_arrow_single.gif" />
											<a target="right" href="${pageContext.request.contextPath}${url}.action">
											${name} 
											</a> 
										</div>
									</li>
								</s:if>
							</s:iterator>
						</ul>
					</li>
				</s:if>
			</s:iterator>
		</ul>
	</div>
</body>
</html>

